
README file for:

SPECIAL INTERESTS TRADEOFF: CAMPAIGN FINANCE REFORMS AND RELIGIOUS INFLUENCE IN POLITICS IN BRAZIL

---------------------
Replication notes
----------------------

REPLICATION FILES
- codebook.csv contains information for all datasets and their columns.
- All .r files name what object it produces.

	Datasets
	- mayors_municipal_level.rds: this is the main dataset.
	- underspending_table.rdata: This dataset is only used to replicate Figure 1.
	- time_trends.rdata: This dataset is only usde to replicate Fig_A1.r
	- prb_iurd.Rda: This dataset is only usde to replicate Fig_A2.r
	- denom_centralization.rda: This dataset is only usde to replicate Fig_A4.r
	- denom_centralization.rda: This dataset is only usde to replicate Fig_A6.r

To replicate the results you will need to run the scripts in R. The replication files run on "R version 4.4.0 (2024-04-24 ucrt)." 

Please note that you will need to install several packages. Importantly, the replication files use the package "here" to organize where the data should be retrieved and where the figure outputs will be stored. I recommend reading the package notes (https://here.r-lib.org/). 

Here is a brief and sufficient instruction. create an "R project" in a folder which will be a root directory. In this folder, you will need to create a "data" folder to store all the data files necessary to run the replication. Next, you will need to create a "img" folder. You can also keep all the script files at a "code" folder.



root
 |
 --- code
 |
 --- data_
 |
 --- img


DATA SOURCES
The main data source is the Electoral authority.

Other data sources include the IBGE, and RAIS for church branches.


 


